﻿using System;
using System.Collections.Generic;
using WebApplication11.Dao;
using WebApplication11.Models;

namespace WebApplication11.Services;

public class adminService
{
    private messageDao _messageDao = new messageDao();
    private departmentDao _departmentDao = new departmentDao();
    public List<message> search(string msg)
    {
        return _messageDao.search(msg);
    }
    
    public List<message> SelectAll()
    {
        return _messageDao.SelectAll();
    }
    
    public List<message> Select(int id)
    {
        return _messageDao.Select(id);
    }
    
    public List<message> Select(String leader)
    {
        return _messageDao.Select(leader);
    }
    
    public bool Delete(int aid)
    {
        return _messageDao.Delete(aid);
    }
    
    public bool Update(message message)
    {
        return _messageDao.Update(message);
    }
    
    public bool Insert(message message)
    {
        return _messageDao.Insert(message);
    }
    
    public List<leader> getIdentity(string username)
    {
        return _departmentDao.getIdentity(username);
    }
}